package model;


import java.util.LinkedList;
import java.util.List;

import vue.Observeur;

public abstract class Observable<T, S extends Observeur<T>> {
	protected List<S> obsPlateau = new LinkedList<S>();
	
	public void ajouterObs(S ObsPlat) {
		obsPlateau.add(ObsPlat);
	}

	public void supprimerObs(S ObsPlat) {
		obsPlateau.remove(ObsPlat);
		
	}
	
	protected void notifier(T Modification) {
		for (S ObsPlat: obsPlateau) {
			ObsPlat.Modification(Modification);
		}
	}
}
